import request from "@/utils/request";

/**
 * 电梯询价—修改联系人信息数据接口
 */
export async function updateInquiryInfo(params = {}) {
    return request(
        `/api/v1/inquiry/sys/save`,
        {
            method: 'POST',
            body: params,
        }
    );
}

/**
 * 电梯询价管理查询数据接口
 */
export async function inquiryList(params = {}) {
    return request(
        `/api/v1/inquiry/list`,
        {
            method: 'POST',
            body: params,
        }
    );
}

/**
 * 电梯询价审批接口
 */
export async function inquiryAudit(params = {}) {
    return request(
        `/api/v1/inquiry/audit`,
        {
            method: 'POST',
            body: params,
        }
    );
}

/**
 * 电梯询价—保存数据接口
 */
export async function insertInquiry(params = {}) {
    return request(
        `/api/v1/inquiry/save?elevatorIds=${params.elevatorIds}`,
        {
            method: 'POST',
            body: params,
        }
    );
}

/**
 * 根据ID获取询价单信息数据接口
 */
export async function getInquiryInfo(params = {}) {
    return request(
        `/api/v1/inquiry/${params.id}`,
        {
            method: 'POST',
        }
    );
}

/**
 * 根据ID删除询价表信息数据接口
 */
export async function delInquiryInfo(params = {}) {
    return request(
        `/api/v1/inquiry/${params.id}`,
        {
            method: 'DELETE',
        }
    );
}

/**
 * 根据关联ID删除询价电梯设备关联信息数据接口
 */
export async function delInquiryRelation(params = {}) {
    return request(
        `/api/v1/inquiry/relation/${params.id}`,
        {
            method: 'DELETE',
        }
    );
}

/**
 * 根据询价单ID获取电梯设备列表数据接口
 */
export async function inquiryRelationList(params = {}) {
    return request(
        `/api/v1/inquiryrelation/list`,
        {
            method: 'POST',
            body: params,
        }
    );
}
